{% extends "smra_portal/portal_template.html" %}
{% block page_id %}deadlinks{% endblock %} 

{% block main %}

	<div class="page_title">Dead Links</div>

	{% if dead_links %}
	<table class="row_set">
		<tr>
			<th>Date First checked</th>
			<th>Date Last tried</th>
			<th>Link (click to change)</th>
			<th>Reason</th>
		</tr>
		{% for deadlink in dead_links %}
   		<tr class="{% cycle 'row_odd' 'row_even' %}">
			<td class="dead_date">{{deadlink.date_created}}</td>
			<td class="dead_date">{{deadlink.date_accessed}}</td>
			<td><a href="/smra/admin/smra_portal/mediaobjectparameter/{{deadlink.parameter.pk}}/"
			>{{deadlink.parameter.value}}</a></td>
			<td>{{deadlink.reason}}</td>
		</tr>
		{% endfor %}
	</table>
	{% endif %}
{% endblock %}

{% block messages %}	
	{% if dead_links %}
	{% else %}
		<div class="error_message">No dead links found!</div>
	{% endif %}
{% endblock %}